package itdfq.ydd.Behavior_Patters.visitor;

/**
 * @Author GocChin
 * @Date 2021/5/25 17:08
 * @Blog: itdfq.com
 * @QQ: 909256107
 */
public class Client {
    public static void main(String args[]){
        System.out.println("18031210136  杨丹丹");
        System.out.println("按家用电标准计算电费");
        Visitor visitor=new HomeAmmeterVisitor();
        Ammeter ammeter=new Ammeter();
        ammeter.setElectricAmount(5678);
        ammeter.accept(visitor);
        System.out.println("按工业用电标准计算电费");
        visitor=new IndustryAmmeteVisitor();
        ammeter.setElectricAmount(5678);
        ammeter.accept(visitor);
    }
}
